@extends('layout.userinfo')
@section('content')

            <div class="profile-panel" role="main">
                <!-- ngIf: pageTitleVisible -->
                <h3 ng-if="pageTitleVisible" class="profile-paneltitle ng-scope">
                        <span ng-bind="pageTitle" class="ng-binding">
                            个人资料
                        </span>
                        <span class="subtitle ng-binding" ng-bind-html="pageSubtitle | toTrusted">
                        </span>
                </h3>
                <!-- end ngIf: pageTitleVisible -->
                <div class="profile-panelcontent" ng-transclude="">
                    <div class="profileinfo ng-scope">
                        <p class="profileinfo-item">
                                <span class="profileinfo-label">
                                    头像
                                </span>
                                <span class="profileinfo-face">
                                    @if(!$data)
                                        <img ng-src="" alt="seeklegend" src="/upload/images/default.jpg">
                                        <a class="profileinfo-facedit" href="/photo" onclick="location.reload([false])">
                                            编辑头像
                                        </a>
                                    @else
                                    <img ng-src="" alt="seeklegend" src="{{$data->photo}}">
                                    <a class="profileinfo-facedit" href="/photo" onclick="location.reload([false])">
                                        编辑头像
                                    </a>
                                    @endif
                                </span>
                        </p>
                        <p class="profileinfo-item">
                                <span class="profileinfo-label">
                                    用户名
                                </span>
                                <span>
                                    <span class="profileinfo-value ng-binding" ng-bind="user.username">
                                        {{$res->name}}
                                    </span>
                                      <a class="profileinfo-link aaa"  id="cl" href="/username" onclick="location.reload([false])">
                                          [修改]
                                      </a>
                                    <!-- ngIf: user.is_auto_generated.username -->
                                </span>
                        </p>
                        <p class="profileinfo-item">
                                <span class="profileinfo-label">
                                    手机号码
                                </span>
                            <!-- ngIf: user.is_mobile_valid -->
                                <span ng-if="user.is_mobile_valid" class="ng-scope">
                                    <span class="profileinfo-value ng-binding" ng-bind="user.mobile">
                                        {{$res->phone}}
                                    </span>
                                    <a class="profileinfo-link" href="/phone" onclick="location.reload([false])">
                                        [修改]
                                    </a>
                                </span>
                            <!-- end ngIf: user.is_mobile_valid -->
                            <!-- ngIf: !user.is_mobile_valid -->
                        </p>
                        <p class="profileinfo-item">
                                <span class="profileinfo-label">
                                    我的邮箱
                                </span>
                            <!-- ngIf: user.is_email_valid -->
                            <!-- ngIf: !user.is_email_valid -->
                            @if(!$res->email)
                                <span ng-if="!user.is_email_valid" class="ng-scope">
                                    <span class="profileinfo-value unbind">
                                        未绑定
                                    </span>
                                    <a class="profileinfo-link unbind" href="/mail" onclick="location.reload([false])">
                                        [立即绑定]
                                    </a>
                                </span>
                            @else
                                <span class="profileinfo-value ng-binding" ng-bind="user.mobile">
                                        {{$res->email}}
                                    </span>

                                <a class="profileinfo-link" href="/mail" onclick="location.reload([false])">
                                    [修改]
                                </a>
                                @endif
                        </p>

                    </div>
                </div>
            </div>
        </div>
    </div>

    @endsection
